home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-07-19 | 3.6 KB | 93 lines | [TEXT/pdos] |
- SetFile -- Set File Attributes
-
- Syntax SetFile [option...] file...
-
- Description Sets attributes for one or more files. The options apply to all
- files listed. Files may be listed singly or by the use of the APW
- shell wildcard characters.
-
- Input None.
-
- Ouptut None.
-
- Diagnostics Error messages are written to diagnostic output.
-
- Status These status codes may be returned:
-
- 0 The attributes for all files were set
- 1 Syntax error.
- 2 An error occurred.
-
- Options -a 'attributes'
- Set or clear the file attributes. The string 'attributes' is
- composed of the characters listed below. Attributes that
- aren't listed remain unchanged.
-
- D Destroy enable
- N Rename enable
- B Backup needed
- I Invisible
- W Write enable
- R Read enable
-
- Uppercase letters set the attribute to 1; lowercase letters
- clear it to 0. For example,
-
- SetFile -a dnwbR Filename
-
- Clears the Destroy, Rename, Write, and Backup bits, and sets
- the Read bit. This means that file file cannot be deleted,
- renamed, or written to, but it can be read from. The backup
- bit is also cleared, which tells backup programs (such as
- Backup II) that the file doesn't need to be backed up. (See
- the GS/OS reference for a description of the access attribute
- bits.)
-
- -at 'type'
- Sets the auxilliary type. 'type' may be specified either in
- decimal or hexadecimal form. Hexadecimal numbers must be
- preceeded by a '$' character or '0x' character sequence.
-
- -c 'date'
- Set the creation date. 'date' is a string in the form
-
- "mm/dd/yy [hh:mm[:ss] [AM|PM]]"
-
- representing the month (1-12), day (1-31), year (0-99), hour
- (0-23), minute (0-59), and second (0-59). The string must be
- quoted if it contains a space. A period (.) indicates the
- current date and time.
-
- -m 'date'
- Set the modification date. 'date' is the same format as for
- the -c option. A period (.) indicates the current date and
- time.
-
- -p
- Display program title, copyright notice, and progress
- information.
-
- -t 'type'
- Sets the file type. 'type' may be specified as a decimal
- number, a hexadecimal number when preceeded by a '$' or '0x'
- character(s), or a 3-character filetype mnemonic. SetFile
- recognizes the same mnemonics that the Files utility produces
- in it's extended file listings.
-
-
- Examples SetFile -a b -m . =.asm
-
- Clears the backup-needed access attribute bit, and set's the
- modification date to the current date and time on all files in the
- current directory that end in '.asm'.
-
- SetFile -c "07/03/90 2:25" 2/cinclude/=.h
-
- Sets the creation date to July 3, 1990, and 2:25 A.M. on all files
- in the 2/cinclude directory that end in '.h'. Note that the date
- string is quoted, since it contains a space, and that A.M. is
- assumed when the hour is less than 13 and no AM or PM is specified.
-
- See Also Files utility (available as part of the 'APW Tools and Interfaces'
- product available from APDA) and GS/OS Reference Volume 1.
-